package com.mdd.common.util.sms;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class SmsSendResult{
    //    CommoneResponse.data  {"Message":"账户余额不足","RequestId":"9881FC95-28C3-499C-B15F-63AEBA1BA832","Code":"isv.AMOUNT_NOT_ENOUGH"}

    @JSONField(name = "Message")
    private String message;

    @JSONField(name = "RequestId")
    private String requestId;

    @JSONField(name = "Code")
    private String code;

    @JSONField(name = "BizId")
    private String bizId;

    public boolean isSuccess() {
        return "ok".equalsIgnoreCase(code);
    }

    @Override
    public String toString(){
        return JSONObject.toJSONString(this);
    }
}
